import React, { Component } from 'react';
import { Outlet } from 'react-router-dom';
import MyNavLink from '../../components/MyNavLink';
import Message from './Message';
import News from './News';
export default class Home extends Component {
  render() {
    // v6版本props中没有属性
    // console.log(this.props);
    return (
      <div>
        <h3>I am Home</h3>
        <ul className="nav nav-tabs">
          <li>
            <MyNavLink to="news">News</MyNavLink>
          </li>
          <li>
            <MyNavLink to="message">Message</MyNavLink>
          </li>
        </ul>
        {/* 嵌套路由渲染的"占位符", 智能识别匹配的路由, 嵌套的路由在App中注册 */}
        <Outlet />
      </div>
    );
  }
}
